package com.zfzs.post.service;

import com.zfzs.post.model.dto.AppPayDTO;
import com.zfzs.post.model.dto.OrderDTO;
import com.zfzs.post.model.vo.OrderListVO;
import com.zfzs.post.model.vo.OrderVO;
import com.zfzs.post.modules.goods.domain.GoodOrder;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author wq
 * @date 2019/10/22 14:26
 * @description
 */
public interface OrderService {

    /**
     * 个人订单列表
     * @param params
     * @return
     */
    List<OrderListVO> getOrderList(Map<String, Object> params);

    /**
     * 获取详情
     * @param params
     * @return
     */
    OrderVO getOrderById(Map<String, Object> params);

    /**
     * 添加order返回订单号
     * @param orderDTO
     * @return
     */
    String addOrder(OrderDTO orderDTO);

    /**
     * 删除order
     * @param params
     */
    void deleteOrder(Map<String, String> params);

    /**
     * 修改order以及状态
     * @param order
     * @param status
     */
    void updateOrderStatus(GoodOrder order, Integer status);

    /**
     * 确认收货
     * @param params
     */
    void confirmOrder(Map<String, String> params);

    /**
     * 取消订单
     * @param params
     */
    void cancelOrder(Map<String, String> params);

    /**
     * APP支付
     * @param dto
     */
    String appPay(AppPayDTO dto);

    /**
     * APP支付宝回调
     * @param requests
     * @return
     */
    String aliAppCallback(HttpServletRequest requests);
}
